.class public Lcom/glympse/android/glympse/ViewSendGlympse$OnItemClickRecipient;
.super Ljava/lang/Object;
.source "ViewSendGlympse.java"

# interfaces
.implements Landroid/widget/AdapterView$OnItemClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/glympse/android/glympse/ViewSendGlympse;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1
    name = "OnItemClickRecipient"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Landroid/widget/AdapterView$OnItemClickListener;"
    }
.end annotation


# instance fields
.field final synthetic this$0:Lcom/glympse/android/glympse/ViewSendGlympse;


# direct methods
.method public constructor <init>(Lcom/glympse/android/glympse/ViewSendGlympse;)V
    .locals 0
    .parameter

    .prologue
    .line 943
    iput-object p1, p0, Lcom/glympse/android/glympse/ViewSendGlympse$OnItemClickRecipient;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onItemClick(Landroid/widget/AdapterView;Landroid/view/View;IJ)V
    .locals 9
    .parameter
    .parameter "oView"
    .parameter "nPosition"
    .parameter "lId"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/widget/AdapterView",
            "<*>;",
            "Landroid/view/View;",
            "IJ)V"
        }
    .end annotation

    .prologue
    .local p1, oAdapterView:Landroid/widget/AdapterView;,"Landroid/widget/AdapterView<*>;"
    const/4 v8, 0x5

    const/4 v7, 0x4

    .line 949
    invoke-virtual {p1, p3}, Landroid/widget/AdapterView;->getItemAtPosition(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/database/Cursor;

    .line 952
    .local v1, oCursor:Landroid/database/Cursor;
    const/4 v5, 0x1

    invoke-interface {v1, v5}, Landroid/database/Cursor;->getInt(I)I

    move-result v0

    .line 953
    .local v0, eRecipientType:I
    const/4 v5, 0x3

    invoke-interface {v1, v5}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v3

    .line 954
    .local v3, strLabel:Ljava/lang/String;
    invoke-interface {v1, v7}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v4

    .line 955
    .local v4, strName:Ljava/lang/String;
    invoke-interface {v1, v8}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v2

    .line 957
    .local v2, strData:Ljava/lang/String;
    if-ne v7, v0, :cond_1

    .line 959
    iget-object v5, p0, Lcom/glympse/android/glympse/ViewSendGlympse$OnItemClickRecipient;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    new-instance v6, Lcom/glympse/platform/common/Recipient;

    invoke-direct {v6, v7}, Lcom/glympse/platform/common/Recipient;-><init>(I)V

    invoke-virtual {v5, v6}, Lcom/glympse/android/glympse/ViewSendGlympse;->AddRecipient(Lcom/glympse/platform/common/Recipient;)V

    .line 981
    :cond_0
    :goto_0
    return-void

    .line 961
    :cond_1
    if-ne v8, v0, :cond_2

    .line 963
    iget-object v5, p0, Lcom/glympse/android/glympse/ViewSendGlympse$OnItemClickRecipient;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    new-instance v6, Lcom/glympse/platform/common/Recipient;

    invoke-direct {v6, v8}, Lcom/glympse/platform/common/Recipient;-><init>(I)V

    invoke-virtual {v5, v6}, Lcom/glympse/android/glympse/ViewSendGlympse;->AddRecipient(Lcom/glympse/platform/common/Recipient;)V

    goto :goto_0

    .line 968
    :cond_2
    invoke-static {v2}, Lcom/glympse/platform/common/Recipient;->GuessType(Ljava/lang/String;)I

    move-result v0

    .line 969
    if-eqz v0, :cond_0

    .line 972
    invoke-static {v4}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v5

    if-nez v5, :cond_3

    invoke-static {v3}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v5

    if-nez v5, :cond_3

    .line 974
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v6, " ("

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, ")"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 978
    :cond_3
    iget-object v5, p0, Lcom/glympse/android/glympse/ViewSendGlympse$OnItemClickRecipient;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    new-instance v6, Lcom/glympse/platform/common/Recipient;

    invoke-static {v4}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v7

    if-eqz v7, :cond_4

    const/4 v7, 0x0

    :goto_1
    invoke-direct {v6, v2, v0, v7}, Lcom/glympse/platform/common/Recipient;-><init>(Ljava/lang/String;ILjava/lang/String;)V

    invoke-virtual {v5, v6}, Lcom/glympse/android/glympse/ViewSendGlympse;->AddRecipient(Lcom/glympse/platform/common/Recipient;)V

    goto :goto_0

    :cond_4
    move-object v7, v4

    goto :goto_1
.end method
